﻿// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-12-13 22:14:56
// 负责人：Sushee
// ===================================================================
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq.Expressions;
using OF.Utility;
using OF.Component.Model;
using OF.Component.IDAL;
using OF.Component.Factory;
namespace OF.Component.BLL
{
	
	/// <summary>
	///身份证信息 扩展
	/// </summary>
	public partial class IDCardOperate
	{
        /// <summary>
    	/// 根据断言条件获取单个身份证信息
    	/// </summary>
        public static IDCardInfo QuerySingle(Expression<Func<IDCardInfo, bool>> predicate)
        {
            return dal.QuerySingle(predicate);
        }
        
        /// <summary>
    	/// 根据断言条件获获取身份证信息列表
    	/// </summary>
        public static IList<IDCardInfo> QueryList(Expression<Func<IDCardInfo, bool>> predicate)
        {
            return dal.QueryList(predicate);
        }

        /// <summary>
        /// 根据身份证和用户查询
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="idNum">身份证号</param>
        /// <returns></returns>
        public static IDCardInfo GetByUserIDAndNum(long userId, string idNum)
        {
            return dal.GetByUserIDAndNum(userId, idNum);
        }

        /// <summary>
        /// 根据用户查询
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        public static IDCardInfo GetByUserID(long userId)
        {
            return dal.GetByUserID(userId);
        }
    }
}